import pymysql
class Mysql01():
    def __init__(self,host,user,password,database):
        self.connect = pymysql.connect(host=host,user=user,password=password,database=database)
        self.cursor = self.connect.cursor()
    def select(self,sql):
        self.cursor.execute(sql)
        return self.cursor.fetchall()
    def clear(self):
        self.cursor.close()
        self.connect.close()